﻿using System.Windows.Controls;
using System.Windows.Media;
using jSLCore.Client.Presentation.Controls;
using Telerik.Windows.Controls;

namespace jSLCore.Client.Presentation.Wpf.TelerikSupport.Controls
{
    public class jRadSplashScreen : ContentControl, ISplashScreen
    {
        private readonly RadBusyIndicator _radBusyIndicator;
        public jRadSplashScreen(RadBusyIndicator radBusyIndicator)
        {
            _radBusyIndicator = radBusyIndicator;
            this.Background = new SolidColorBrush(Colors.Transparent);
        }

        public bool IsBusy
        {
            get { return _radBusyIndicator.IsBusy; }
            set
            {
                _radBusyIndicator.IsBusy = value;
            }
        }

        public object HeaderContent
        {
            get
            {
                return _radBusyIndicator.BusyContent;
            }
            set
            {
                _radBusyIndicator.BusyContent = value;
            }
        }
    }
}
